package nl.twingate.processrevivor.views;



import nl.avics.paed.R;
import nl.twingate.processrevivor.logic.ReviveProcessesByGUITask;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Bundle;
import android.text.TextUtils;
import android.text.method.ScrollingMovementMethod;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;


/**
 * A simple frontend to let the user know what this app does.
 *  
 * @author Marijn Oosterveld
 *
 */
public class ProcessRevivor extends Activity {
	
	private String tag = "QuraProcessMonitor";
	

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Log.e(tag, "WARNING: PROCESS REVIVOR STARTED");
        
        //Load the textview that is shown on the main 
        TextView mainText = (TextView) findViewById(R.id.sometext);
        mainText.setMovementMethod(new ScrollingMovementMethod());
        
        //Give the user some info on which processes are monitored:
        String resultOnScreen = getString(R.string.app_desc) + " ";
		mainText.setText(resultOnScreen);

		//Let the user decide to reive the monitored apps by clicking a button
		Button reviveButton = (Button)findViewById(R.id.button1);
		reviveButton.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				new ReviveProcessesByGUITask(ProcessRevivor.this).execute();
			}
		});
		
		
    }
    
}